<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>乘法表</title>
    <style>
        body {
            background: white;
        }

        table {
            margin-top: 100px;
        }
    </style>

</head>
<body>
<script>

    var colors=["#FF0000","#00ffg0","#dFf0h0","#Fh5f0f","#F5bd00","#nfufg0","#00t5ff","#0Ffft0","green","yellow","pink","blue","purple"];
    document.write("<b>")
    document.write("<table align='center'>");
    for (var i = 1; i <= 9; i++) {

        var res= Math.random()*colors.length;
        var number = Math.floor(res);

        document.write("<tr bgcolor='"+colors[number]+"'>");
        for (var j = 1; j <= i; j++) {
            document.write("<td height='40'>");
            document.write(i + " x " + j + " =" + (i * j) + "&nbsp;&nbsp")
            document.write("</td>")
        }
        document.write("</tr>")
        //document.write("<br>");
    }
    document.write("</table>");
    document.write("</b>")
    location.reload()
</script>


</body>
</html>